Visual Basic (Declaration) | |
---|---|
Function GetOrAdd( _ ByVal key As TKey, _ ByVal fnCreate As Converter(Of TKey,TValue) _ ) As TValue |
C# | |
---|---|
TValue GetOrAdd( TKey key, Converter<TKey,TValue> fnCreate ) |
Parameters
- key
- The key of the element to add.
- fnCreate
- Constructs a new value for the key.
Exception | Description |
---|---|
System.NotSupportedException | The IDictionary is read-only. |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7